<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@include file="common/header.jsp"%>
<div class="clearfix"></div>
<div class="row">
  <div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h2>入库单信息 <i class="fa fa-user"></i><small>${devUserSession.devName}</small></h2>
             <div class="clearfix">
             <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
						cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
						<thead>
							<tr role="row">
					 			<th class="sorting_asc" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 70px;" aria-label="First name: activate to sort column descending"
									aria-sort="ascending">采购编号</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 10px;"
									aria-label="Last name: activate to sort column ascending">
									商品名称</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 90px;"
									aria-label="Last name: activate to sort column ascending">
									商品总价格</th>
							
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;" 
									aria-label="Last name: activate to sort column ascending">
									时间</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;" 
									aria-label="Last name: activate to sort column ascending">
									执行状态</th>
							</tr>
						</thead>
						<tbody>
						<tr role="row" class="odd">
						<td>${purchase.purchaseId }</td>
						<td>${purchase.suppilername }</td>
						<td>${purchase.purchasePrice }</td>
						<td><fmt:formatDate value="${purchase.purchaseData}" type="both" dateStyle="default" pattern="yyyy-MM-dd"></fmt:formatDate></td>
						<td><c:if test="${purchase.execute ==1}">未入库</c:if>
						<c:if test="${purchase.execute==2 }">已入库</c:if>
						</td>
						</tr>
						</tbody>
						</table>
             </div>
      </div>
   
        <div class="clearfix"></div>
        <div class="x_title">
            <h2>入库明细单</h2>
            <ul class="nav navbar-right panel_toolbox">
              <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
              </li>
            </ul>
          <div class="clearfix"></div>
        </div>
        <div class="x_content" style="display: block;">
         <br>
        <div id="datatable-responsive_wrapper"
			class="dataTables_wrapper form-inline dt-bootstrap no-footer">
			<div class="row">
				<div class="col-sm-12">
					<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
						cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
						<thead>
							<tr role="row">
								<th class="sorting_asc" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 70px;" aria-label="First name: activate to sort column descending"
									aria-sort="ascending">采购编号</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 10px;"
									aria-label="Last name: activate to sort column ascending">
									商品名称</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 90px;"
									aria-label="Last name: activate to sort column ascending">
									商品数量</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" cgolspan="1"
									style="width: 50px;"
									aria-label="Last name: activate to sort column ascending">
									已买数量</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;"
									aria-label="Last name: activate to sort column ascending">
									未购数量</th>
								<th class="sorting" tabindex="0"
									aria-controls="datatable-responsive" rowspan="1" colspan="1"
									style="width: 50px;" 
									aria-label="Last name: activate to sort column ascending">
									总金额</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="purchasebill" items="${purchasebill }" varStatus="status">
								<tr role="row" class="odd">
									<td tabindex="0" class="sorting_1">${purchasebill.goodId}</td>
									<td>${purchasebill.goodName }</td>
									<td>${purchasebill.yetCount }</td>
									<td>${purchasebill.yetCount }</td>
									<td>0</td>
									<td>${purchasebill.price }</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
      </div>
    </div>
     <div class="form-group">
        <div class="col-md-6 col-md-offset-3">
          <a href="${pageContext.request.contextPath }/caigou/list"><button type="button" class="btn btn-primary" id="back">返回</button></a>
          <c:if test="${purchase.execute !=2}">
        
         <a href="${pageContext.request.contextPath }/insert?id=${purchase.purchaseId }"><button id="send" type="button" class="btn btn-success">保存</button></a>
        </c:if>
        </div>
      </div> 
    <div class="clearfix"></div>
    <br/><br/>
  </div>
</div>
<%@include file="common/footer.jsp"%>
<script src="${pageContext.request.contextPath }/statics/localjs/appinfoview.js"></script>